﻿#include "FITKPhyscisPropertyGeneralLaminateIsoLayer.h"
#include "FITKAcousticsAbsMaterial.h"
#include "FITKAcousticsAbstractSpectra.h"
#include "FITK_Kernel/FITKCore/FITKDataRepo.h"


namespace Acoustics
{
    double FITKPhyscisPropertyGeneralLaminateIsoLayer::getThickness() const
    {
        return _thickness;
    }

    void FITKPhyscisPropertyGeneralLaminateIsoLayer::setThickness(double thickness)
    {
        _thickness = thickness;
    }

    void FITKPhyscisPropertyGeneralLaminateIsoLayer::setMaterialID(const int id)
    {
        _materialID = id;
    }

    int FITKPhyscisPropertyGeneralLaminateIsoLayer::getMaterialID() const
    {
        return _materialID;
    }

    FITKAcousticsAbsMaterial* FITKPhyscisPropertyGeneralLaminateIsoLayer::getMaterialObj()
    {
        //从仓库获取数据，并进行强制类型转换
        return  FITKDATAREPO->getTDataByID<FITKAcousticsAbsMaterial>(_materialID);
    }

    QString FITKPhyscisPropertyGeneralLaminateIsoLayer::getMaterialName()
    {
        //材料对象
        FITKAcousticsAbsMaterial* m = this->getMaterialObj();
        if (m == nullptr) return QString();
        //材料名称
        return m->getDataObjectName();
    }

    void FITKPhyscisPropertyGeneralLaminateIsoLayer::setDLFSplectrumID(const int id)
    {
        _DLFSplectrum = id;
    }


    Acoustics::FITKAcousticsAbstractSpectra* FITKPhyscisPropertyGeneralLaminateIsoLayer::getDLFSplectrumObj()
    {
        //从仓库获取数据，并进行强制类型转换
        return  FITKDATAREPO->getTDataByID<FITKAcousticsAbstractSpectra>(_DLFSplectrum);
    }

    int FITKPhyscisPropertyGeneralLaminateIsoLayer::getDLFSplectrumID() const
    {
        return _DLFSplectrum;
    }

    void FITKPhyscisPropertyGeneralLaminateIsoLayer::setAngle(const double & angle)
    {
        _angle = angle;
    }


    double FITKPhyscisPropertyGeneralLaminateIsoLayer::getAngle() const
    {
        return _angle;
    }

}
